<?php
/**
 * Created by PhpStorm.
 * User: white
 * Date: 2020/4/9
 * Time: 17:50
 */

namespace app\admin\controller;


class Article extends Base
{
    //文章列表
    public function articlelist()
    {
        $articlelist = model('common/Article') -> order(['create_time','desc']) -> paginate(2);
        $viewData = [
            'articlelist' => $articlelist
        ];
        $this -> assign($viewData);
        return view();
    }

    //文章添加
    public function articleadd()
    {

        $catelist = model('common/Cate') -> select();
        $viewData = [
            'catelist' => $catelist
        ];
        $this -> assign($viewData);
        return view();
    }


}